﻿<UserControl x:Class="NewCompanyWelcomePage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
             xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="1000">
    <UserControl.Resources>
        <ResourceDictionary>
            <ControlTemplate x:Key="ButtonBackstageControlTemplate" TargetType="{x:Type Fluent:Button}">
                <Grid>
                    <Border x:Name="border" BorderThickness="1" Margin="0" Background="Transparent" BorderBrush="LightGray">
                        <StackPanel Margin="2" x:Name="stackPanel">
                            <ContentPresenter x:Name="iconImage" HorizontalAlignment="Center" Height="32" Width="32" VerticalAlignment="Center" Content="{Binding LargeIcon, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource StringToImageConvert}}" Margin="9,9,9,0" SnapsToDevicePixels="True"/>
                            <Fluent:TwoLineLabel x:Name="twoLineLabel" Margin="7,7,7,5" VerticalAlignment="Center" Text="{TemplateBinding Header}"/>
                        </StackPanel>
                    </Border>
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsEnabled" Value="False">
                        <Setter Property="Opacity" TargetName="iconImage" Value="0.5"/>
                        <Setter Property="Opacity" TargetName="twoLineLabel" Value="0.5"/>
                        <Setter Property="BorderBrush" TargetName="border" Value="#FFC8C8C9"/>
                        <Setter Property="Effect" TargetName="iconImage">
                            <Setter.Value>
                                <Fluent:GrayscaleEffect/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="Background" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.1"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="BorderBrush" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.6"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="IsFocused" Value="True">
                        <Setter Property="Background" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.1"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="BorderBrush" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.6"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="IsPressed" Value="True">
                        <Setter Property="BorderBrush" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="1"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Background" TargetName="border" >
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.5"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
            <Style TargetType="{x:Type Fluent:Button}" x:Key="ButtonBackstageStyle">
                <Setter Property="Template" Value="{StaticResource ButtonBackstageControlTemplate}"/>
                <Setter Property="Height" Value="81"/>
                <Setter Property="Width" Value="85"/>
            </Style>

            <Style TargetType="{x:Type Fluent:ToggleButton}" x:Key="ToggleButtonBackstageStyle">
                <Setter Property="Template" Value="{DynamicResource ToggleButtonBackstageControlTemplate}"/>
                <Setter Property="Height" Value="81"/>
                <Setter Property="Width" Value="85"/>
            </Style>
            <ControlTemplate x:Key="ToggleButtonBackstageControlTemplate" TargetType="{x:Type Fluent:ToggleButton}">
                <Grid>
                    <Border x:Name="border" BorderThickness="1" Margin="0" BorderBrush="LightGray">
                        <StackPanel x:Name="stackPanel">
                            <ContentPresenter x:Name="iconImage" HorizontalAlignment="Center" Height="32" VerticalAlignment="Center" Content="{Binding LargeIcon, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource StringToImageConvert}}" Width="32" Margin="9,9,9,0" SnapsToDevicePixels="True"/>
                            <Fluent:TwoLineLabel x:Name="twoLineLabel" Margin="7,7,7,5" VerticalAlignment="Center" Text="{TemplateBinding Header}"/>
                        </StackPanel>
                    </Border>
                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsEnabled" Value="False">
                        <Setter Property="Opacity" TargetName="iconImage" Value="0.5"/>
                        <Setter Property="Opacity" TargetName="twoLineLabel" Value="0.5"/>
                        <Setter Property="Effect" TargetName="iconImage">
                            <Setter.Value>
                                <Fluent:GrayscaleEffect/>
                            </Setter.Value>
                        </Setter>
                        <!--<Setter Property="BorderBrush" TargetName="border" Value="#FFC8C8C9"/>-->
                    </Trigger>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="Background" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.1"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="BorderBrush" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.6"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="Background" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.1"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="BorderBrush" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.6"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="IsFocused" Value="True">
                        <Setter Property="Background" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.1"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="BorderBrush" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.6"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="IsPressed" Value="True">
                        <Setter Property="BorderBrush" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="1"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Background" TargetName="border" >
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.5"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                    <Trigger Property="IsChecked" Value="True">
                        <Setter Property="BorderBrush" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.5"/>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Background" TargetName="border">
                            <Setter.Value>
                                <SolidColorBrush Color="#FF5195B7" Opacity="0.2"/>
                            </Setter.Value>
                        </Setter>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>

            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
            
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary  x:Name="LocalizationStrings" Source="../../Localization/MainWindowStrings-de.xaml" />
                <ResourceDictionary  x:Name="LocalizationStrings2" Source="../../Localization/Dialoges-de.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>   
    </UserControl.Resources>
    <TabControl Name="tabcontrol" Margin="0">
        <TabItem Header="{StaticResource WelcomeToBiller}" MinWidth="280">
            <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,10,0,0">
                <StackPanel>
                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerInfo1}" TextWrapping="Wrap" Margin="12,0,0,0"/>
                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerInfo2}" TextWrapping="Wrap" Margin="12,0,0,0" />
                    <Grid Margin="10,40,0,0">
                        <Grid Width="150" HorizontalAlignment="Left">
                            <Image Width="48" Height="48" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0"/>
                        </Grid>
                        <Grid Margin="160,0,0,0">
                            <StackPanel VerticalAlignment="Center">
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
                                    <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Text="{DynamicResource CompanyName}" Width="120"  Margin="7,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center"/>
                                    <TextBox FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="NewCompanyName" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Width="284" BorderBrush="#FF9A9C9E" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
                                    <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Text="{DynamicResource AddressAddition}" Width="120"  Margin="7,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center"/>
                                    <TextBox FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="NewCompanyAddressAddition" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Width="284" BorderBrush="#FF9A9C9E" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
                                    <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock Text="{DynamicResource StreetNo}" Width="120" Margin="7,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15"/>
                                    <TextBox Name="NewCompanyStreet" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Width="216" BorderBrush="#FF9A9C9E" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15"/>
                                    <TextBox Name="NewCompanyNo" HorizontalAlignment="Left" Margin="5,0,0,0" VerticalAlignment="Top" Width="62" BorderBrush="#FF9A9C9E" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
                                    <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock Text="{DynamicResource ZipCity}" Width="120" Margin="7,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15"/>
                                    <TextBox Name="NewCompanyZip" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Width="62" BorderBrush="#FF9A9C9E" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15"/>
                                    <TextBox Name="NewCompanyCity" HorizontalAlignment="Left" Margin="5,0,0,0" VerticalAlignment="Top" Width="216" BorderBrush="#FF9A9C9E" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" ClipToBounds="False" >
                                    <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Text="{DynamicResource Country}" Width="120"  Margin="7,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center"/>
                                    <TextBox FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="NewCompanyCountry" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Top" Width="284" BorderBrush="#FF9A9C9E" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,20,0,5" ClipToBounds="False">
                                    <CheckBox Content="{StaticResource NoNewComapany}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="cb_ChooseComapany" IsChecked="False"/>
                                    
                                </StackPanel>
                                <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Text="Wählen Sie diese Option, wenn Sie ein Update durchgeführt haben!" Foreground="Red" Margin="20,0,0,0"/>
                            </StackPanel>
                        </Grid>
                    </Grid>
                    <Grid Margin="10,40,40,0" Visibility="Collapsed">
                        <Grid Width="150" HorizontalAlignment="Left">
                            <Fluent:ToggleButton Header="{StaticResource ButtonImportData}" Style="{StaticResource ToggleButtonBackstageStyle}" Icon="Images/import.png" LargeIcon="../../Images/import.png" Width="100" Height="85" Name="ToggleImport"/>
                        </Grid>
                        <Grid Margin="160,0,0,0">
                            <StackPanel VerticalAlignment="Center">
                                <TextBlock Text="{StaticResource BillerImport1}" Margin="7,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20"/>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5,0,5" ClipToBounds="False" >
                                    <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock Text="CSV-Import" Margin="7,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5,0,5" ClipToBounds="False" Visibility="Collapsed">
                                    <Rectangle Width="7" Height="7" Fill="DarkGray" StrokeThickness="0" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock Text="XML-Import" Width="90"  Margin="7,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Segoe UI, Lucida Sans Unicode, Verdana"/>
                                </StackPanel>
                            </StackPanel>
                        </Grid>
                    </Grid>
                    <Fluent:Button Header="{StaticResource ButtonNext}" Style="{StaticResource ButtonBackstageStyle}" Width="100" Height="85" Margin="0,20,40,0" HorizontalAlignment="Right" Icon="next.png" LargeIcon="next.png" Name="NewCompanyResume"/>
                </StackPanel>
            </ScrollViewer>
        </TabItem>
        <TabItem Header="{StaticResource DBHeader}" Name="dbtab" MinWidth="150" Visibility="Collapsed">
            <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,10,0,0">
                <StackPanel>
                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerDB1}" TextWrapping="Wrap" Margin="12,0,0,0"/>
                    <RadioButton Margin="50,30,0,0" Content="{StaticResource LocalXMLDB}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="rb_localdb" GroupName="DB" IsChecked="True"/>
                    <ComboBox Width="300" Margin="70,10,0,0" HorizontalAlignment="Left" SelectedIndex="0" Visibility="{Binding ElementName=rb_localdb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}" Name="cb_ldbs">
                        <ComboBoxItem Content="XML (wurde in früheren Versionen verwendet)"/>
                        <ComboBoxItem Content="SQLite" IsEnabled="False"/>
                    </ComboBox>
                    <StackPanel Margin="70,10,0,0" Visibility="{Binding ElementName=rb_localdb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <TextBox Width="500" metro:TextboxHelper.Watermark="{StaticResource BillerLDBPath}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_localdbdirectory" HorizontalAlignment="Left"/>
                    </StackPanel>
                    <RadioButton Margin="50,10,0,0" Content="{StaticResource RemoteDB}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="rb_remotedb" GroupName="DB"/>                   
                    <ComboBox Width="200" Margin="70,10,0,0" HorizontalAlignment="Left" SelectedIndex="0" Visibility="{Binding ElementName=rb_remotedb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}" Name="cb_dbs">
                        <ComboBoxItem Content="MySQL"/>
                        <ComboBoxItem Content="Microsoft SQL Server 2008"/>
                        <ComboBoxItem Content="Microsoft SQL Server 2012"/>
                        <ComboBoxItem Content="PostgreSQL"/>
                    </ComboBox>
                    <StackPanel Orientation="Horizontal" Margin="70,10,0,0" Visibility="{Binding ElementName=rb_remotedb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <TextBox Width="200" metro:TextboxHelper.Watermark="{StaticResource DBServer}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_dbserver"/>
                        <TextBox Width="200" Margin="30,0,0,0" metro:TextboxHelper.Watermark="{StaticResource DBName}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_dbdbname"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="70,10,0,0" Visibility="{Binding ElementName=rb_remotedb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <TextBox Width="200" metro:TextboxHelper.Watermark="{StaticResource UserName}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_dbuser"/>
                        <PasswordBox Width="200" Margin="30,0,0,0" metro:TextboxHelper.Watermark="{StaticResource Password}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_dbuserpasswd"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="70,10,0,0" Visibility="{Binding ElementName=rb_remotedb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <Fluent:Button Header="{StaticResource ButtonCheckConnection}" Style="{StaticResource ButtonBackstageStyle}" Width="100" Height="85" HorizontalAlignment="Left" Icon="db.png" LargeIcon="db.png" Click="Button_Click_3"/>
                        <TextBlock Text="{StaticResource ConnectionWorking}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Foreground="Green" VerticalAlignment="Center" Name="lbl_connectionworks" Margin="20,0,0,0" Visibility="Collapsed"/>
                        <TextBlock Text="{StaticResource ConnectionFailed}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Foreground="Red" VerticalAlignment="Center" Name="lbl_connectionfailed" Margin="20,0,0,0" Visibility="Collapsed"/>
                    </StackPanel>

                    <StackPanel Margin="50,30,0,0" Visibility="{Binding ElementName=cb_ChooseComapany, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerChooseCompany}" TextWrapping="Wrap"/>
                        <StackPanel Orientation="Horizontal">
                            <Fluent:Button Header="{StaticResource ButtonRefresh}" Style="{StaticResource ButtonBackstageStyle}" Width="100" Height="85" Margin="0,20,40,0" HorizontalAlignment="Left" Icon="../../Images/reload.png" LargeIcon="../../Images/reload.png" Click="Button_Click_4"/>
                            <ListView Margin="0,20,40,0" Height="85" Width="350" Name="LV_ChooseCompany">
                                <ListView.View>
                                    <GridView>
                                        <GridViewColumn Header="Firmenname" Width="300" DisplayMemberBinding="{Binding CompanyName}"/>
                                    </GridView>
                                </ListView.View>
                            </ListView>
                        </StackPanel>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="12,35,0,0" Name="SP_DBQuery" VerticalAlignment="Bottom" Visibility="Hidden">
                        <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerQuery}" TextWrapping="Wrap" Margin="0,0,0,0" VerticalAlignment="Center"/>
                        <metro:ProgressRing IsActive="True" Margin="20,0,0,0"/>
                    </StackPanel>

                    <Fluent:Button Header="{StaticResource ButtonNext}" Style="{StaticResource ButtonBackstageStyle}" Width="100" Height="85" Margin="0,20,40,0" HorizontalAlignment="Right" Icon="next.png" LargeIcon="next.png" Click="Button_Click_1"/>
                </StackPanel>
            </ScrollViewer>
        </TabItem>
        <TabItem Header="{StaticResource UserHeader}" Name="usrtab" Visibility="Collapsed">
            <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,10,0,0">
                <StackPanel>
                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerUser1}" TextWrapping="Wrap" Margin="12,0,0,0"/>
                    <TextBox Width="200" Margin="70,15,0,0" metro:TextboxHelper.Watermark="{StaticResource UserName}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_usrname" HorizontalAlignment="Left"/>
                    <TextBox Width="200" Margin="70,10,0,0" metro:TextboxHelper.Watermark="{StaticResource UserID}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_userid" HorizontalAlignment="Left"/>
                    <PasswordBox Width="200" Margin="70,10,0,0" metro:TextboxHelper.Watermark="{StaticResource Password}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_userpasswd" HorizontalAlignment="Left"/>

                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerUser2}" TextWrapping="Wrap" Margin="12,20,0,0" Visibility="{Binding ElementName=rb_remotedb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                    <TextBox Width="200" Margin="70,15,0,0" metro:TextboxHelper.Watermark="{StaticResource UserName}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_eusrname" HorizontalAlignment="Left" Visibility="{Binding ElementName=rb_remotedb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"/>
                    <PasswordBox Width="200" Margin="70,10,0,0" metro:TextboxHelper.Watermark="{StaticResource Password}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="tb_euserpasswd" HorizontalAlignment="Left" Visibility="{Binding ElementName=rb_remotedb, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}"/>

                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource UserFailed}" Foreground="Red" TextWrapping="Wrap" Margin="12,30,0,0" Name="lbl_usrfailed" Visibility="Collapsed"/>

                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerTax1}" TextWrapping="Wrap" Margin="12,30,0,0"/>
                    <RadioButton Width="200" Margin="70,15,0,0" Content="{StaticResource RBNoTax}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="rb_noTax" HorizontalAlignment="Left" GroupName="Tax"/>
                    <RadioButton Width="300" Margin="70,10,0,0" Content="{StaticResource RBTaxGermany}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="rb_GerTax" HorizontalAlignment="Left" GroupName="Tax" IsChecked="True"/>
                    <RadioButton Width="300" Margin="70,10,0,0" Content="{StaticResource RBTaxAustria}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="rb_AusTax" HorizontalAlignment="Left" GroupName="Tax"/>

                    <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerSampleData}" TextWrapping="Wrap" Margin="12,30,0,0"/>
                    <CheckBox Width="200" Margin="70,15,0,0" Content="{StaticResource SampleUnits}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="cb_SampleUnits" HorizontalAlignment="Left"/>
                    <CheckBox Width="300" Margin="70,10,0,0" Content="{StaticResource SampleCustomers}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="cb_SampleCustomer" HorizontalAlignment="Left"/>
                    <CheckBox Width="300" Margin="70,10,0,0" Content="{StaticResource SampleArticles}" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="15" Name="cb_SampleArticles" HorizontalAlignment="Left"/>

                    <StackPanel Orientation="Horizontal" Margin="12,35,0,0" Name="SP_DBQuery2" VerticalAlignment="Bottom" Visibility="Hidden">
                        <TextBlock FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" FontSize="20" Text="{DynamicResource BillerQuery}" TextWrapping="Wrap" Margin="0,0,0,0" VerticalAlignment="Center"/>
                        <metro:ProgressRing IsActive="True" Margin="20,0,0,0"/>
                    </StackPanel>
                    
                    <Fluent:Button Header="{StaticResource ButtonSave}" Style="{StaticResource ButtonBackstageStyle}" Width="100" Height="85" Margin="0,20,40,0" HorizontalAlignment="Right" Icon="../../Images/save.png" LargeIcon="../../Images/save.png" Click="Button_Click_2"/>
                </StackPanel>
            </ScrollViewer>
        </TabItem>
    </TabControl>
</UserControl>
